#ifndef PLAYER_HPP
#define PLAYER_HPP

#include <SFML/Graphics.hpp>

#include <iostream>

#include "GameObject.hpp"

class Player : public GameObject
{
    protected:
        int m_direction;
        sf::Vector2<float> m_speed;
        float m_offsetY;

        void move();
        void jump();
        void changeDirection();
        void fall();
        void backToGround();

    public:
        Player();
        ~Player();

        void update();

        int direction()const;
        const sf::Vector2<float>& speed()const;
        float offsetY();

        void setDirection(int direction);
        void setSpeed(const sf::Vector2<float>& speed);
        void setOffsetY(float offsetY);
		void setDistance(float distance);

        // surcharge de la méthode issue de GameObject
        void setState(State state);
};

#endif
